package com.yn.iotxiao.sql.entity.User;

import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Date;

@Data
@Table(name = "TeacherInfo",comment = "教师表")
public class TeacherInfo {

    @IsKey
    @NotNull(message = "工号不能为空")
    private String gh;
    @NotNull(message = "姓名不能为空")
    @Column
    private String name;
    @Column
    private String phone;

    @Column(name = "CREATETIME",comment = "录入时间")
    @ColumnType(MySqlTypeConstant.TIMESTAMP)
    @DefaultValue("CURRENT_TIMESTAMP")
    private Date createTime;
}
